package nl.boektrust.btsoep.server.wsdl;

import java.util.LinkedList;
import java.util.List;
import javax.jws.WebMethod;
import javax.jws.WebService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Using example from
 * http://code.google.com/intl/nl/appengine/articles/soap.html.
 * 
 * From project dir (with pom.xml) run
 * "mvn org.jvnet.jax-ws-commons:jaxws-maven-plugin:2.1:wsgen"
 * 
 * For now look in target/jaxws/wsgen/wsdl/ for XSD and WSDL, and change the
 * WSDL into soap:address
 * location="http://frans.webhop.org:8080/"+BrowseSoapServlet
 * 
 * @author frans
 * 
 */
@WebService
public class BrowseWsdl {
	private static final Logger logger = LoggerFactory.getLogger(BrowseWsdl.class);

	@WebMethod
	public List<Book> searchBooks(Book min, Book max, int offset, int limit) {
		// TODO Auto-generated method stub
		logger.info("searchBooks() input: min=" + min + "; max=" + max + "; offset=" + offset + "; limit=" + limit);
		List<Book> ret = new LinkedList<Book>();
		ret.add(new Book("isbn 12345", "titel hallo", "auteur frans"));
		logger.info("searchBooks() return: ret=" + ret);
		return ret;
	}
}
